<div class="bjui-pageContent">
  <table width="100%" border="0" cellspacing="0" cellpadding="10">
    <tbody>
      <tr>
        <td bgcolor="#FFFFFF" style="padding: 10px;"><!-- 内容开始 -->
          <table width="100%" border="0" cellspacing="0" cellpadding="5" style="font-weight: bold;">
            <tbody>
              <tr align="center">
                <td colspan="2" bgcolor="#E4F2FF" style="color: #445588; font-size: medium; font-weight: bold;width: 100%"><div id="divTitle">{$service_info.prompt_message}</div></td>
              </tr>
			 <!--<if condition="$service_info.step_id lt 3 ">
			 <tr>
			 	<td align="right" colspan="2">
				<a class="btn btn-orange" href="{:U('AfterSales/returnToState?service_sn='.$service_info['service_sn'])}"  data-toggle="doajax" data-icon="undo" data-confirm-msg="确定讲订单状态返回上一级？">返回上一步骤</a>
				</td>
			</tr>
			</if>-->
              <tr>
                <td colspan="2"><table id="Th_Exp_Info" width="100%" border="0" cellspacing="0">
                    <tbody>
                      <tr>
                        <td><div id="div_FxyMessage" style="border-bottom: 1px solid #CCC;margin-top: 10px;"> &gt;&gt;供应商的留言：
                            <div id="Th_Audit_Remark" style="width: 100%;margin-top: 10px;margin-bottom: 10px; font-weight: normal;margin-left: 20px;">请把申请售后的商品寄回认定！</div>
                          </div></td>
                      </tr>
                      <tr>
                        <if condition="$after_sales_return eq ''">
                          <td style="padding-left:20px"><div id="lbl_Th_Exp_Info">
                            <form action="{:U('AfterSales/addReturnInfo')}" class="pageForm" data-toggle="validate" method="post">
                              <div style="padding-top: 10px;padding-bottom: 10px;"> <b>请填写退换货商品寄回的快递信息</b>：</div>
                              <div style="padding-top: 5px;margin-bottom: 10px;"> 快递公司：
                                <select name="express_id" data-toggle="selectpicker" data-rule="required">
                                  <option value="">请选择快递</option>
                                  <notempty name="expressList">
                                    <volist name="expressList" id="express">
                                      <option value="{$express.id}">{$express.name}</option>
                                    </volist>
                                  </notempty>
                                </select>
                                <font color="red">*</font> </div>
                              <div style="padding-top: 5px;margin-bottom: 10px;"> 快递单号：
                                <input name="courier_number" type="text" maxlength="25"  style="width:135px;" data-rule="required">
                                <font color="red">*</font> </div>
                              <div style="padding-top: 5px;margin-bottom: 10px;"> 快递运费：
                                <input name="shipping_fee" type="text" maxlength="9" style="width:135px;" value="0.00">
                                <font color="red">*</font> </div>
                              <div style="padding-top: 10px">
                                <button type="submit" class="btn-green" data-icon="save">提交</button>
                                <font color="red"><b>提示</b>：</font>退换货不能到付和平邮等。
                                <input type="hidden" name="service_sn" value="{$service_info.service_sn}">
                              </div>
                              </div>
                            </form></td>
                          <else />
                          <td style=""><div id="div_Th_Exp_Info" style="border-bottom: 1px solid #CCC; margin-top:10px;"> &gt;&gt;寄回商品的物流信息：<a href="{:U('AfterSales/addReturnInfo?&service_sn='.$service_info['service_sn'])}"  data-toggle="dialog" data-width="450" data-height="200" data-id="dialog-normal" data-mask="true" data-title="修改寄回信息">修改寄回信息</a>
                              <div style="font-weight: normal; margin-left: 20px;margin-top: 10px;"> 
                                <p style="line-height:20px;margin-bottom: 0px;">快递公司：<span id="lbl_ExpName">{$after_sales_return.name}</span></p><br>
                                <p style="line-height:20px;margin-bottom: 0px;">快递单号：<span id="lbl_ExpNum">{$after_sales_return.courier_number}</span></p><br>
                                <p style="line-height:20px;">快递费用：<span id="lbl_ExpPrice">{$after_sales_return.shipping_fee}</span> </p></div>
                            </div></td>
                        </if>
                      </tr>
                      <if condition="$service_info.step_id eq '2'">
                        <tr>
                          <td><div id="div_Confirm_Receive" style="border-bottom: 1px solid #CCC; margin-top:10px;"> &gt;&gt;确认收货信息：
						  <form style="margin-top: 10px; margin-left:25px;" action="{:U('AfterSales/confirmReceive')}" class="pageForm" data-toggle="validate" method="post">
                              <div style="font-weight: normal; padding-bottom: 10px;">
                                <div style="padding-bottom: 10px;">
                                  <input type="radio" name="receive"  data-rule="checked" data-toggle="icheck" data-label="寄回商品" value="1" style="margin-right:0px;">
                                  <font class="blue">无其它问题，可以退换货</font>
                                  <input type="radio" name="receive"  data-rule="checked" data-toggle="icheck" data-label="寄回商品" value="-1" style="margin-right:0px;">
                                  <font class="red">有问题，需要协商</font> </div>
                                <div style="padding-bottom: 10px; display: none;" id="show_Th_Duty">
                                  <notempty name="dutys">
                                    <volist name="dutys" id="duty">
                                      <input type="radio" name="duty"  data-toggle="icheck" data-label="{$duty}" value="{$duty}"  <if condition="$service_info.responsible_party eq $duty ">checked="checked" </if> >
                                    </volist>
                                  </notempty>
                                  &nbsp;
                                  <input name="txt_duty" type="text" maxlength="20" id="txt_duty" style="width:100px;display: none;">
                                  <div style="padding-bottom: 10px;" id="show_Th_Remark"> <span id="ReceiveTitle" style="margin-top: 15px;
display: block;">收货备注：</span><br>
                                    <textarea name="receive_remark" rows="5" cols="20" id="receive_remark" style="width:350px;"></textarea>
                                  </div>
                                </div>
                                <div style="padding-bottom: 10px;display: none;" id="show_Th_Pro_Remark"> <span id="ReceiveTitle" style="display: block;">请填写寄回商品的问题：</span><br>
                                  <textarea name="pro_remark" rows="5" cols="20" id="pro_remark" style="width:350px;"></textarea>
                                </div>
                                <div style="">
                                  <button type="submit" class="btn-green" data-icon="save">提交</button>
								  <input type="hidden" name="service_sn" value="{$service_info.service_sn}">
                                </div>
                              </div>
							 </form>
                            </div></td>
                            <style>
                            .ilabel {
								margin-right: 20px;
							}
                            </style>
                        </tr>
                      </if>
					  <if condition="$service_info.step_id  egt '3' and $service_info.step_id  neq '5'  and $service_info.action_type eq '2'">
					  <tr><td style="padding-left: 20px;">
					  	<a style="margin-top: 10px;" class="btn btn-green" data-toggle="navtab" data-options="{id:'CO{$service_info['service_sn']}', url:'{:U('AfterSales/createOrder?service_sn='.$service_info['service_sn'].'&navTabId=CO'.$service_info['service_sn'])}', title:'{$service_info.service_sn}-生成订单'}">生成换货订单</a>
					  </td></tr>
					  </if>
                    </tbody>
                  </table></td>
              </tr>
              <tr>
                <td><div style="margin-left: 20px;"> 售后记录号：<span id="lblSaleAfterRecordNo" style="font-weight:normal;">{$service_info.service_sn}</span></div></td>
                <td> 售后状态：<span id="lblSaleAfterStatus" style="font-weight:normal;">{$service_info.after_sales_status}</span> </td>
              </tr>
              <tr>
                <td><div style="margin-left: 20px;"> 系统订单号：<span id="lbl_OrderId" style="font-weight:normal;">{$service_info.order_no}</span></div></td>
                <td> 网店单号：<span id="lbl_Order_No" style="font-weight:normal;">{$service_info.order_sn}</span> </td>
              </tr>
              <tr>
                <td><div style="margin-left: 20px;"> 发货时间：<span id="lblCreateTime" style="font-weight:normal;">{:date('Y-m-d H:i:s', $service_info['outbound_sn_time'])}</span></div></td>
                <td> 最后更新时间：<span id="lblLastUpdateTime" style="font-weight:normal;">{:date('Y-m-d H:i:s', $service_info['time'])}</span> </td>
              </tr>
              <tr>
                <td><div style="margin-left: 20px;"> 售后类型：<span id="lblSaleAfterType" style="font-weight:normal;">
                    <if condition="$service_info.action_type eq 1"> 退货
                      <else />
                      换货</if>
                    </span></div></td>
                <td> 出库单号：<span id="lbl_SsoBillNo" style="font-weight:normal;">{$service_info.outbound_sn}</span> </td>
              </tr>
              <tr>
                <td colspan="2"><div style="font-weight: bold; margin-left: 20px;"> 申请售后的商品： <span id="lblNoRecord"></span>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_List_Table" style="font-weight: normal;margin-top: 15px;border: 1px solid #ddd;" rules="none">
                      <tbody>
                        <tr class="Main_List_Table_Tr1">
                          <td width="25%"> 商品名称 </td>
                          <td width="15%"> 商品货号 </td>
                          <td width="20%"> 颜色/规格<br>
                            条码 </td>
                          <td width="15%"> 售后数量 </td>
                        </tr>
                        <notempty name="service_goods_list">
                          <volist name="service_goods_list" id="goods">
                            <tr onMouseOver="this.className='Main_List_Table_Tr_Over'" onMouseOut="this.className='Main_List_Table_Tr_Out'" class="Main_List_Table_Tr_Out">
                              <td> {$goods.name} </td>
                              <td> {$goods.sn}</td>
                              <td> 颜色：{$goods.color_name}，规格：{$goods.spec_name}<br>
                                {$goods.bar_code} </td>
                              <td> {$goods.return_num} </td>
                            </tr>
                          </volist>
                        </notempty>
                      </tbody>
                    </table>
                  </div></td>
              </tr>
              <tr>
                <td colspan="2"><div style="margin-left: 20px;"> 责任方：<span id="lbl_Th_Duty" style="font-weight:normal;">{$service_info.responsible_party}</span></div></td>
              </tr>
              <tr>
                <td colspan="2"><div style="margin-left: 20px;margin-bottom: 10px;"> 售后原因及详情：</div>
                  <div id="Th_Remark" style="width: 100%; border: 3px; font-weight: normal; margin-left: 20px; display: block;">售后原因：{$service_info.return_reason}</br></br>
                    售后详情：<br>
                    {$service_info.details}</div></td>
              </tr>
              <tr>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td colspan="2" align="center"></td>
              </tr>
			  <if condition="$service_info.step_id eq 1 ">
			  <tr>
			  	<td colspan="2" align="center">
					<div id="div_AuditCancel">
					<form style="margin-top: 10px; margin-left:25px;" action="{:U('AfterSales/cancelRecord')}" class="pageForm" data-toggle="validate" method="post">
						<input type="hidden" name="cancel_order" value="{$service_info.order_id}">
						<input type="hidden" name="cancel_service_sn" value="{$service_info.service_sn}">
						<input type="submit" name="btnAuditCancel" value="取消并结束" id="btnAuditCancel">
					</form>
					</div>
				</td>
			  </tr>
			  </if>
            </tbody>
          </table>
          <br>
          <div style="margin-left: 20px;"> <b>操作流程：</b> <span id="lblNoRecord1"></span>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_List_Table" style="font-weight: normal; margin-top:15px;border: 1px solid #ddd;" rules="none">
              <tbody>
                <tr class="Main_List_Table_Tr1">
                  <td width="10%"> 序号 </td>
                  <td width="15%"> 操作日期 </td>
                  <td width="15%"> 操作用户 </td>
                  <td width="45%"> 操作内容 </td>
                </tr>
                <notempty name="after_sales_log">
                  <volist name="after_sales_log" id="log">
                    <tr onMouseOver="this.className='Main_List_Table_Tr_Over'" onMouseOut="this.className='Main_List_Table_Tr_Out'">
                      <td>{$log.no}</td>
                      <td> {:date('Y-m-d H:i:s', $log['operate_time'])} </td>
                      <td> {$log.user_name} </td>
                      <td> {$log.operate_content}</td>
                    </tr>
                  </volist>
                </notempty>
              </tbody>
            </table>
          </div>
          <!-- 内容结束 -->
        </td>
      </tr>
    </tbody>
  </table>
</div>
<div class="bjui-pageFooter">
  <ul>
    <li>
      <button type="button" class="btn-close" data-icon="close">取消</button>
    </li>
    <li>
      <button type="submit" class="btn-default" data-icon="save">保存</button>
    </li>
  </ul>
</div>
<script language="javascript">
$(".in input[type=radio][name=duty]").on('ifChecked',function () {
	document.getElementById('txt_duty').style.display =  (this.value ==="其他") ? "" : "none";
	document.getElementById('txt_duty').value = "";
}).on('ifUnchecked', function () {
	document.getElementById('txt_duty').style.display =  (this.value === "其他") ? "" : "none";
	document.getElementById('txt_duty').value = "";
})

$(".in input[type=radio][name=receive]").on('ifChecked',function () {
	document.getElementById('show_Th_Duty').style.display =  (this.value ==="1") ? "" : "none";
	document.getElementById('show_Th_Pro_Remark').style.display =  (this.value ==="-1") ? "" : "none";
	document.getElementById('receive_remark').value = "";
}).on('ifUnchecked', function () {
	document.getElementById('show_Th_Duty').style.display =  (this.value === "1") ? "" : "none";
	document.getElementById('show_Th_Pro_Remark').style.display =  (this.value ==="-1") ? "" : "none";
	document.getElementById('receive_remark').value = "";
})
</script>
